<<<<<<< HEAD
package com.yootk.client;
import java.net.Socket;
import java.util.Scanner;

public class Y2 {
    public static void main(String[] args) throws Exception {
        // 设置服务器的连接地址（localhost表示本机）以及端口号
        Socket client = new Socket("localhost", 9999);
        Scanner scanner = new Scanner(client.getInputStream());
        // 接收服务器端输出
        if (scanner.hasNext()) { // 接收到数据
            System.out.println("【HelloClient】" + scanner.next());
            // 内容打印
        }
        client.shutdownInput();    // 等待输入完成
        client.close();    // 客户端关闭
=======
<<<<<<< HEAD
import java.util.*;
public class Y2 {
    public static void main(String[] args) throws Exception {
        List <String> all=new ArrayList<>();
        all.add("沐言科技：www.yootk.com");
        all.add("李华：edu.yootk.com");
        all.add("沐言科技：www.yootk.com");
        System.out.println("【获取索引为0的数据】"+all.get(0));
        System.out.println("【获取索引为1的数据】"+all.get(1));
        System.out.println("【获取索引为2的数据】"+all.get(2));
=======
import java.io.*;
public class Y2 {
    public static void main(String[] args) throws Exception{
        File file=new File("E:"+File.separator+"muyan"+File.separator+"vip"+File.separator+"yootk.txt");
        if (file.exists()){
            try(InputStream input=new FileInputStream(file)){
                byte data[]=new byte[1024];
                int len=input.read(data);
                System.out.println("读取到的内容【"+new String(data,0,len)+"】");
            }catch (Exception e){}
        }
>>>>>>> f33091f7d3c9fad97e415e3fe7e0daaa9a183f56
>>>>>>> 4442d0ff08afd6a675d4f7f09aa88fa83a0c21ef
    }
}
